package org.zjvis.datascience.common.dto;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import org.zjvis.datascience.common.util.DozerUtil;
import org.zjvis.datascience.common.vo.PluginVO;

@Data
public class PluginDTO extends BaseDTO {
    private Long id;
    private String name;
    private String token;
    private Integer status; //0-off  1-on
    private String url;
    private String version;
    private String iconEncode;
    private String dataJson;
    private String description;

    public PluginVO view() {
        PluginVO vo = DozerUtil.mapper(this, PluginVO.class);
        vo.setData(JSON.parseObject(this.dataJson));
        return vo;
    }
}
